package yf.mall.vo.down;


import lombok.Data;
import java.util.Date;
import com.alibaba.excel.annotation.*;
import java.io.Serializable;


import java.math.BigDecimal;

import yf.mall.entity.CashApplyEntity;
import yf.mall.vo.CashApplyVo;

                                                import yf.mall.enums.CashApplyStatusEnum;

/**
 * 提现申请表实体
 * 表名 cash_apply
 *
 *
 *
 * @date Tue Sep 29 10:16:21 CST 2020
 */
@Data
public class CashApplyDown implements Serializable {
    @ExcelIgnore
    private static final long serialVersionUID = 1L;

                        //
            @ExcelProperty("")
            private Long id;
        
                        //用户id
            @ExcelProperty("用户id")
            private Long userId;
        
                        //申请金额
            @ExcelProperty("申请金额")
            private BigDecimal amount;
        
                        //申请编号
            @ExcelProperty("申请编号")
            private String appNo;
        
                        //开户人
            @ExcelProperty("开户人")
            private String accName;
        
                        //开户银行
            @ExcelProperty("开户银行")
            private String bank;
        
                        //银行分行
            @ExcelProperty("银行分行")
            private String accBranch;
        
                        //银行卡号
            @ExcelProperty("银行卡号")
            private String number;
        
                        //IMG-汇款凭证
            @ExcelProperty("IMG-汇款凭证")
            private String img;
        
                        //申请时间
            @ExcelProperty("申请时间")
            private Date crateTime;
        
                        //通过时间
            @ExcelProperty("通过时间")
            private Date passTime;
        
                        //ENUM-状态:"AUDIT-待审核","PASS-通过","REFUSE-拒绝"
            @ExcelIgnore
            private Integer status;
                        @ExcelProperty("状态")
            private String statusStr;
        
    
    public CashApplyDown() {

    }

    public CashApplyDown(CashApplyVo vo) {
        CashApplyEntity entity = vo.getEntity();
                                    this.setId(entity.getId());
            
                                    this.setUserId(entity.getUserId());
            
                                    this.setAmount(entity.getAmount());
            
                                    this.setAppNo(entity.getAppNo());
            
                                    this.setAccName(entity.getAccName());
            
                                    this.setBank(entity.getBank());
            
                                    this.setAccBranch(entity.getAccBranch());
            
                                    this.setNumber(entity.getNumber());
            
                                    this.setImg(entity.getImg());
            
                                    this.setCrateTime(entity.getCrateTime());
            
                                    this.setPassTime(entity.getPassTime());
            
                                    this.setStatus(entity.getStatus());
                if(entity.getStatus()!=null){
                    this.setStatusStr( CashApplyStatusEnum.indexOf(entity.getStatus()));
                }
            
            }


}
